using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;

public class GUITextField : CustomGUIController
{

    public UnityAction<string> changeStr;

    
    public string preStr = "";
    protected override void DrawStyleOn()
    {
        content.text = GUI.TextField(pos.Pos, content.text, style);
        if (preStr != content.text)
        {
            changeStr?.Invoke(content.text);
            preStr = content.text;
        }
    }

    protected override void DrawStyleOff()
    {
        content.text = GUI.TextField(pos.Pos, content.text);
        if (preStr != content.text)
        {
            changeStr?.Invoke(content.text);
            preStr = content.text;
        }
    }

}
